#!/bin/bash
NAME=www
PROSS=`ps -el | grep $NAME | awk '{ print $14 }'`
STAT=`ps -el | grep $NAME | awk '{ print $2 }'`
PID=`ps -el | grep $NAME | awk '{ print $4 }'`

if [ $PROSS ]
	echo "$PROSS exists. PID:$PID killed!"
	then
		kill -9 $PID
fi

echo "building $NAME"
go build

nohup ./www &